<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <script type="text/javascript" src="./static/sjs/mqttws31.js"></script>
  <script type="text/javascript" src="./static/sjs/hexUtil.js"></script>

  <script src="static/cordova/cordova.js"></script>
  <script type="text/javascript" src="static/cordova/cordova_plugins.js"></script>
  <script type="text/javascript">
    document.addEventListener('deviceready', function () {
      console.log('Device is Ready!');
      // ....your code
    }, false);

    // 自己定义的button点击事件
    // Cordova.exec后三个绑定插件的参数分别是：插件名、插件方法、传输内容
    function BTClick() {
      Cordova.exec(successFunction, failFunction, "MyTestPlugin", "testMethod", ["弹出alertView"]);
    }
    // 失败回调
    function failFunction(error) {
      alert(error);
    }
    // 成功回调
    function successFunction(ok) {
      alert(ok);
    }

    function yourCallbackFunction(ok) {
      alert(ok);
    }

  </script>



  <title>vue-learn</title>
</head>

<body>
  <div id="app"></div>
  <!-- <p>点击下面按钮弹出alertView</p>
  <button onclick="BTClick()">弹出alertView</button> -->
</body>

</html>